#include "catinfo.h"
#include "kmglang_en.h"

static uint16 myStuffActionList[] = {
	IDS_MYRINGERS,
	IDS_MY_MUSIC,
	IDS_MYGRAPHICS,
	IDS_MY_GAMES,
	IDS_MY_THEMES,
	IDS_MY_OTHER_STUFF,
	0,
};

static uint16 myRingersActionList[] = {
	IDS_GET_MORE_RINGERS,
	0,
};

static char* myRingersPathList[] = {
	"fs:/media/snd/ringer/",
	"fs:/media/snd/ringer/default/",
	"fs:/shared/ringers/",
	"fs:/media/snd/savedsnd/",
	"fs:/media/snd/savedsnd/default/",
	0,
};

static char* voiceMemoPathList[] = {
	"fs:/media/snd/voicememo/",
	"fs:/card0/voicememo/",
	0,
};

static uint16 myGraphicsActionList[] = {
	IDS_GET_MORE_GRAPHICS,
	IDS_WALLPAPERS,
	IDS_SCREENSAVERS,
	IDS_MY_PICTURES,
	IDS_PICTUREIDS,
	0,
};

static uint16 soundsActionList[] = {
	IDS_MYRINGERS,
	IDS_VOICEMEMOS,
	0,
};

static char* wallpapersPathList[] = {
	"fs:/media/img/wallpaper/",
	"fs:/media/img/wallpaper/default/",
	"fs:/shared/wallpaper/",
	"fs:/media/img/savedimg/",
	0,
};

static char* screensaversPathList[] = {
	"fs:/media/img/screensaver/",
	"fs:/media/img/screensaver/default/",
	"fs:/shared/screensaver/",
	0,
};

static char* myPicturesPathList[] = {
	"fs:/shared/campics/",
	"fs:/shared/campics/pics/",
	"fs:/card0/campics/",
	"fs:/media/img/savedimg/",
	0,
};

static char* callerIDsPathList[] = {
	"fs:/media/img/picid/",
	"fs:/media/img/picid/default/",
	0,
};

static CatInfo catTable[] =
{
	{
		IDS_MY_STUFF, //cat name
		ViewTypeNumberedList, //view type
		myStuffActionList, //action list
		NULL, //path list
		FALSE, //autoplay
	},
	{
		IDS_MYRINGERS,
		ViewTypeList,
		myRingersActionList,
		myRingersPathList,
		TRUE,
	},
	{
		IDS_MYGRAPHICS,
		ViewTypeList,
		myGraphicsActionList,
		NULL,
		FALSE,
	},
	{
		IDS_WALLPAPERS,
		ViewTypeThumbnail,
		NULL,
		wallpapersPathList,
		FALSE,
	},
	{
		IDS_SCREENSAVERS,
		ViewTypeThumbnail,
		NULL,
		screensaversPathList,
		FALSE,
	},
	{
		IDS_MY_PICTURES,
		ViewTypeThumbnail,
		NULL,
		myPicturesPathList,
		FALSE,
	},
	{
		IDS_PICTUREIDS,
		ViewTypeThumbnail,
		NULL,
		callerIDsPathList,
		FALSE,
	},
	{
		IDS_SOUNDS,
		ViewTypeList,
		soundsActionList,
		NULL,
		FALSE,
	},
	{
		IDS_VOICEMEMOS,
		ViewTypeList,
		NULL,
		voiceMemoPathList,
		FALSE,
	},
};

uint16 CatInfo_GetStartCatID(MGalleryMode mode)
{
	switch(mode)
	{
	case MGalleryModeChooseSound:
		return IDS_SOUNDS;
	default:
		return catTable[0].catID;
	}
}

boolean CatInfo_GetInfo(uint16 catID, CatInfo *info)
{
	int i;

	for(i = 0; i<ARRAY_SIZE(catTable); i++)
	{
		if(catTable[i].catID != catID)
			continue;
		if(info)
			*info = catTable[i];
		return TRUE;
	}

	return FALSE;
}
